package org.example.operator;

import java.math.BigDecimal;

/**
 *
 * 操作属性类，其中包含了，进行操作的两个数，以及计算前和计算后的数值
 * @author Silver
 */
public class OperatorField {

    /**
     * 用来操作的数据1
     */
    private BigDecimal num1;

    /**
     * 用来操作的数据2
     */
    private BigDecimal num2;

    /**
     * 操作前的数据
     */
    private ResultSource<BigDecimal> beforeResult;

    /**
     * 操作后的数据
     */
    private ResultSource<BigDecimal> afterResult;

    public OperatorField(BigDecimal num1, BigDecimal num2, ResultSource beforeResult, ResultSource afterResult) {
        this.num1 = num1;
        this.num2 = num2;
        this.beforeResult = beforeResult;
        this.afterResult = afterResult;
    }

    public BigDecimal getNum1() {
        return num1;
    }

    public void setNum1(BigDecimal num1) {
        this.num1 = num1;
    }

    public BigDecimal getNum2() {
        return num2;
    }

    public void setNum2(BigDecimal num2) {
        this.num2 = num2;
    }

    public ResultSource<BigDecimal> getBeforeResult() {
        return beforeResult;
    }

    public void setBeforeResult(ResultSource beforeResult) {
        this.beforeResult = beforeResult;
    }

    public ResultSource<BigDecimal> getAfterResult() {
        return afterResult;
    }

    public void setAfterResult(ResultSource afterResult) {
        this.afterResult = afterResult;
    }

    @Override
    public String toString() {
        return "OperatorField{" +
                "num1=" + num1 +
                ", num2=" + num2 +
                ", beforeResult=" + beforeResult +
                ", afterResult=" + afterResult +
                '}';
    }
}
